package cn.wmw.xyy.exception;

import lombok.Data;

@Data
public class GlobalException extends RuntimeException{

    private String code;

    public GlobalException(){
    }

    public GlobalException(String message){
        super(message);
    }

    public GlobalException(GlobalExceptionEnum exceptionEnum){
        super(exceptionEnum.getMessage());
        this.code = exceptionEnum.getCode();
    }

    public GlobalException(String message,String code){
        super(message);
        this.code = code;
    }


}
